/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hotel.jpa;

import entities.GuestUser;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author Anton Karlsson
 */
public interface IBookingJpaCtrl<T> {
    
    void create(T t);
    
    void destroy(Long id);
    
    void edit(T t);
    
    T findEntity(T t) throws NonexistentEntityException;
    
    List<T> findEntities();
    
    List<T> findMyBookings(GuestUser aUser);
    
    EntityManager getEntityManager();
    
    int getEntityCount();
}
